<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<c:forEach items="${nebula_model_viewcfg.modalViews}" var="modalView" varStatus="status">

<c:choose>
	<c:when test="${modalView.type == 'add' || modalView.type == 'update' }">
		<c:set var="nebula_model_modalid" value="${modalView.type}Modal"></c:set>
	</c:when>
	<c:otherwise>
		<c:set var="nebula_model_modalid" value="${modalView.id}"></c:set>
	</c:otherwise>
</c:choose>

<div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" 
	id="${nebula_model_modalid}" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
				<h4 class="modal-title">${modalView.title}</h4>
			</div>
			<div class="modal-body">
				<c:set var="nebula_model_editview_properties" value="${modalView.properties}" scope="request"></c:set>
				<jsp:include page="edit-form.jsp" flush="true"></jsp:include>
			</div>
		</div>
	</div>
</div>
</c:forEach>

<div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" 
	id="deleteModal" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
				<h4 class="modal-title">警告</h4>
			</div>
			<div class="modal-body">
				<h4 style="margin:0 0 20px 0">真的要删除这条记录吗？</h4>
				<div class="form-group" style="margin-bottom: 0;">
					<div class="col-lg-12">
						<button type="submit" class="btn btn-danger">确定</button>&nbsp;
						<a data-dismiss="modal" type="button" class="btn btn-primary">取消</a>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>